/*
 * @Description: 用户相关路由
 * @Autor: xiaohuihui
 * @Date: 2022-11-28 17:27:49
 * @LastEditors: xiaohuihui
 * @LastEditTime: 2022-12-23 10:23:26
 */
const express = require('express');
const userHandler = require('../router_handler/user')
const {register,login} = require('../schema/user') 
// 1. 导入验证表单数据的中间件
const expressJoi = require('@escook/express-joi')

const router = express.Router()

// 登录
router.post('/user/login',expressJoi(login),userHandler.login)

// 注册
router.post('/user/register',expressJoi(register),userHandler.register)

module.exports = router